<?php
/**
 * 微信开放授权相关接口
 *
 * @author Zeon scplay@gmail.com
 * @date 2017/11/17
 * @copyright Created by Panxsoft.
 */
use Illuminate\Support\Facades\Route;

/**
 * 授权事件消息
 *
 * @see \App\Http\Controllers\OpenWechat\AuthorizerController::auth()
 */
Route::any('authorizer-auth-event', 'AuthorizerController@auth');

/**
 * @see \App\Http\Controllers\OpenWechat\AuthorizerController::preAuthUrl()
 */
Route::get('pre-auth-url', 'AuthorizerController@preAuthUrl');

/**
 * 公众号授权完成回调
 *
 * @see \App\Http\Controllers\OpenWechat\AuthorizerController::preAuthCallback()
 */
Route::get('pre-auth-callback', 'AuthorizerController@preAuthCallback')
    ->name(\App\Http\Controllers\OpenWechat\AuthorizerController::AUTHOR_PRE_AUTH_CALLBACK_ROUTE);

/**
 * 获取开放平台的 component ACS TOKEN
 *
 * @see \App\Http\Controllers\OpenWechat\AuthorizerController::componentAccessToken()
 */
Route::get('component-acs-token', 'AuthorizerController@componentAccessToken');

/**
 * 获取授权公众号信息
 *
 * @see \App\Http\Controllers\OpenWechat\AuthorizerController::authorizerInfo()
 */
Route::get('authorizer-info/{appid}', 'AuthorizerController@authorizerInfo');

/**
 * 获取授权公众号微信菜单信息
 *
 * @see \App\Http\Controllers\OpenWechat\AuthorizerController::authorizerMenu()
 */
Route::get('authorizer-menu/{appid}', 'AuthorizerController@authorizerMenu');

/**
 * 获取授权公众号微信 access token
 *
 * @see \App\Http\Controllers\OpenWechat\AuthorizerController::accessToken()
 */
Route::get('authorizer-acs-token/{appid}', 'AuthorizerController@accessToken');

/**
 * 获取授权公众号, 生成指定二维码（临时/永久）
 *
 * @see \App\Http\Controllers\OpenWechat\AuthorizerController::authorizerQrCode()
 */
Route::get('authorizer-qr-code/{appid}', 'AuthorizerController@authorizerQrCode');

/**
 * 获取授权公众号, 的js sdk
 *
 * @see \App\Http\Controllers\OpenWechat\AuthorizerController::authorizerJSSDK()
 */
Route::any('authorizer-js-sdk/{appid}', 'AuthorizerController@authorizerJSSDK');

/**
 * 通过公众号下发分享的图片
 *
 * @see \App\Http\Controllers\OpenWechat\ImageShareController
 */
Route::resource('image-share-qrcode', 'ImageShareController');

/**
 * 通过公众号下发分享的视频
 *
 * @see \App\Http\Controllers\OpenWechat\VideoShareController
 */
Route::resource('video-share-qrcode', 'VideoShareController');



